package com.shadow.web.back;

import org.springframework.web.servlet.ModelAndView;

/**
 * Created by qq65827 on 2014/10/26.
 */
public abstract class BaseViewController {
    protected String redirect(String action) {
        return "redirect:" + action;
    }

    protected ModelAndView JspLocation(ModelAndView modelAndView, String action) {
        modelAndView.addObject(getJspLocation() + action);
        return modelAndView;
    }

    protected String JspLocation(String action) {
        return getJspLocation() + action;
    }

    protected abstract String getJspLocation();

}
